#pragma once
#include "ElementNode.h"
#include "math.h"
namespace NBGUI
{
	class GUIAPI Image: public ElementNode
	{
	public:
		Image(GUIDrawer* drawer, const char* name, const char* eleText, int eleType = NONE, Rect& _rect = Rect(),const char* path = "");
		~Image();

		void buildVI(std::vector<Vertex>* vertices, std::vector<unsigned int>* indices,unsigned int screenWidth, unsigned int screenHeight);
		void loadImg(RendererBase* pRenderer);
		void draw();
		void doSomething(std::vector<info>& i, std::string& funcName);
	protected:
		vec2f uv[4];
		std::string imagePath;
		int imageId;
	};
}
